﻿using System.Collections.Generic;

namespace SS.WPF.Framework.BackgroundAction
{
    /// <summary>
    /// The interface that is used to manage indicators for background action 
    /// </summary>
    public interface IBackgroundActionIndicatorsManager
    {
        /// <summary>
        /// Gets or sets a value indicating whether IsLoadingScreen.
        /// </summary>
        bool IsLoadingScreen { get; set; }

        /// <summary>
        /// The list of background action indicators
        /// </summary>
        IEnumerable<IBackgroundActionIndicator> BackgroundActionIndicators { get; set; }

        /// <summary>
        /// Gets a value indicating whether has background actions.
        /// </summary>
        bool HasRunningActions { get; }

        /// <summary>
        /// Store indicator for background action 
        /// </summary>
        /// <param name="action"></param>
        void RegisterTask(IBackgroundActionIndicator action);

        /// <summary>
        /// Remove indicator for background action 
        /// </summary>
        /// <param name="action"></param>
        void UnRegisterTask(IBackgroundActionIndicator action);
    }
}
